﻿using System;
using System.Collections.Generic;
using YJKSparseDistance.ModelLayer;

namespace YJKSparseDisOfRoom.ModelLayer
{
	public class DoorLinkNode
	{
		public DoorPacker_EvacuationDistance ThisDoor
		{
			get
			{
				return this.m_thisDoor;
			}
			private set
			{
				this.m_thisDoor = value;
			}
		}

		public List<ResultBean_InRoom> LstThisDoorResults
		{
			get
			{
				return this.m_lstThisDoorResults;
			}
			private set
			{
				this.m_lstThisDoorResults = value;
			}
		}

		private DoorLinkNode(DoorPacker_EvacuationDistance inputDoor, List<ResultBean_InRoom> inputBeans)
		{
			this.ThisDoor = inputDoor;
			this.LstThisDoorResults = inputBeans;
		}

		internal static DoorLinkNode GetADoorLinkNode(DoorPacker_EvacuationDistance inputDoor)
		{
			if (!DoorLinkNode.m_dicDoorLinkNodes.ContainsKey(inputDoor))
			{
				DoorLinkNode value = new DoorLinkNode(inputDoor, new List<ResultBean_InRoom>());
				DoorLinkNode.m_dicDoorLinkNodes.Add(inputDoor, value);
			}
			return DoorLinkNode.m_dicDoorLinkNodes[inputDoor];
		}

		internal static void SetADoorLinkNode(DoorPacker_EvacuationDistance inputDoor, List<ResultBean_InRoom> inputBeans)
		{
			DoorLinkNode value = new DoorLinkNode(inputDoor, inputBeans);
			if (!DoorLinkNode.m_dicDoorLinkNodes.ContainsKey(inputDoor))
			{
				DoorLinkNode.m_dicDoorLinkNodes.Add(inputDoor, value);
				return;
			}
			DoorLinkNode.m_dicDoorLinkNodes[inputDoor] = value;
		}

		internal static void Reset()
		{
			DoorLinkNode.m_dicDoorLinkNodes = new Dictionary<DoorPacker_EvacuationDistance, DoorLinkNode>();
		}

		private static Dictionary<DoorPacker_EvacuationDistance, DoorLinkNode> m_dicDoorLinkNodes = new Dictionary<DoorPacker_EvacuationDistance, DoorLinkNode>();

		private DoorPacker_EvacuationDistance m_thisDoor;

		private List<ResultBean_InRoom> m_lstThisDoorResults = new List<ResultBean_InRoom>();
	}
}
